<?php

class RatingDAO extends DB {
    var $table_name = 'metrics';
    var $columns = array ('user_id', 'metric_type', 'metric_value');

    function create($data){
        $sql = 'INSERT INTO `'.$table_name.'` (`'.implode('`,`',$columns).'`) VALUES (?,?,?)';

        $stmt = $this->getStmt($sql);

        $stmt->bind_param($data['user_id'],$data['metric_type'],$data['metric_value']);
        $this->_execute($stmt);
    }
}
?>
